Many electronic devices use data processors, such as microprocessors or microcontrollers, to perform operations according to a programmed set of instructions. Processors can be implemented as integrated circuits in plastic or ceramic packages. Within the processor package, a large number of transistors may be arranged to form, for example, a central processing unit (CPU) for a computer.
Some processor architectures include, among other things, a control unit, a memory interface, and an interrupt controller. In some conventional processors, the control unit fetches, decodes, and executes a series of instructions. Upon decoding an individual instruction, the control unit may apply appropriate signals to an arithmetic logic unit (ALU) or to other components.
The control unit can fetch instructions through the memory interface. The memory interface may provide appropriate address, control, and data signals to access and read instructions stored in a memory device, such as a disk drive, random access memory (RAM), or read only memory (ROM). A typical memory interface may supply a series of instructions to be sequentially executed by the control unit. The order in which the instructions are executed by the control unit may be referred to generally as the program flow.
The interrupt controller can interrupt the program flow to respond to an external (e.g., external to the processor package) signal. For example, the interrupt controller may respond to an external signal by temporarily interrupting the control unit's program flow, and causing the control unit to execute a pre-defined set of instructions, which is typically referred to as an interrupt routine. After completing the interrupt routine, the control unit typically resumes the original program flow.